package com.yuyue.dronesystem.beans;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * Encasement
 */
public class Encasement {

    // 容器ID
    private Long boxId;
    // 装箱列表
    private List<EncasementItem> encList = new ArrayList<>();

    public Encasement() {
    }

    public Encasement(Long boxId, List<EncasementItem> encList) {
        this.boxId = boxId;
        this.encList = encList;
    }

    public Long getBoxId() {
        return this.boxId;
    }

    public void setBoxId(Long boxId) {
        this.boxId = boxId;
    }

    public List<EncasementItem> getEncList() {
        return this.encList;
    }

    public void setEncList(List<EncasementItem> encList) {
        this.encList = encList;
    }

    public Encasement boxId(Long boxId) {
        this.boxId = boxId;
        return this;
    }

    public Encasement encList(List<EncasementItem> encList) {
        this.encList = encList;
        return this;
    }

    @Override
    public boolean equals(Object o) {
        if (o == this)
            return true;
        if (!(o instanceof Encasement)) {
            return false;
        }
        Encasement encasement = (Encasement) o;
        return Objects.equals(boxId, encasement.boxId) && Objects.equals(encList, encasement.encList);
    }

    @Override
    public int hashCode() {
        return Objects.hash(boxId, encList);
    }

    @Override
    public String toString() {
        return "{" +
            " boxId='" + getBoxId() + "'" +
            ", encList='" + getEncList() + "'" +
            "}";
    }
}